<!DOCTYPE html>

<html lang="zh-CN">
    <head>
        <meta charset="uft-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Home | ******</title>
        
        <link type="text/css" href="/css/bootstrap.min.css" rel="stylesheet">
        <link type="text/css" href="/css/wst.css" rel="stylesheet">
    </head>
    
    <body>
        <div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-dark border-botton box-shadow" >
            <h5 class="my-0 mr-md-auto font-weight-normal text-white">牛逼的直播平台</h5>
            <nav class="my-2 my-md-0 mr-md-3">
                <a class="p-2 text-white" href="/">主页</a>
                <a class="p-2 text-white" href="/live/">直播</a>
                <a class="p-2 text-white" href="/playback/">回放</a>
            </nav>
            <a class="btn btn-outline-primary" href="/login/">登陆</a>
        </div>
        
        <div id="videos-div" class="hidden">
            <video id="local-video" class="bg-dark" width="640" height="480" autoplay></video>
            <video id="remote-video" class="bg-dark" width="640" height="480" autoplay></video>
        </div>
            
        <div id="room-div">
            <label for="inputRoom">Room:</label>
            <input type="text" id="inputRoom" class="form-control" required autofocus>
            <label for="inputClient">Client:</label>
            <input type="text" id="inputClient" class="form-control" required>
            <button id="join-button" class="btn btn-primary" type="submit">加入</button>
            <button id="call-button"class="btn btn-primary display=none" type="submit">呼叫</button>
            <button id="quit-button" class="btn btn-primary " type="submit">退出</button>
        </form>

        <script src="/js/jquery-3.3.1.min.js"></script>
        <script src="/js/popper.min.js"></script>
        <script src="/js/bootstrap.min.js"></script>
        <script src="/js/adapter.js"></script>
        <script src="/js/wst-util.js"></script>
        <script src="/js/wst-signalingchannel.js"></script>
        <!-- <script src="/js/wst-live.js"></script> -->
        <script src="/js/wst-call.js"></script>
        <script src="/js/wst-app.js"></script>
        
        <script type="text/javascript">
            var params = {
                roomServer: ':8090',
                roomId: 'R1001',
                clientId: 'C1001',
                wssUrl: 'wss://10.33.48.14:8090/wst',
                mediaConstraints: {
                    audio: false,
                    video: true
                }
            };
            var app;

            function initialize() {
                app = new WstApp(params);
            }

            initialize();
        </script>
    </body>
</html>